Optimal. Leaf size=57 \[ -\frac{2 \coth (c+d x)}{a d}+\frac{i \tanh ^{-1}(\cosh (c+d x))}{a d}+\frac{\coth (c+d x)}{d (a+i a \sinh (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0856202, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {2768, 2748, 3767, 8, 3770} \[ -\frac{2 \coth (c+d x)}{a d}+\frac{i \tanh ^{-1}(\cosh (c+d x))}{a d}+\frac{\coth (c+d x)}{d (a+i a \sinh (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2768
Rule 2748
Rule 3767
Rule 8
Rule 3770
Rubi steps
\begin{align*} \int \frac{\text{csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=\frac{\coth (c+d x)}{d (a+i a \sinh (c+d x))}-\frac{\int \text{csch}^2(c+d x) (-2 a+i a \sinh (c+d x)) \, dx}{a^2}\\ &=\frac{\coth (c+d x)}{d (a+i a \sinh (c+d x))}-\frac{i \int \text{csch}(c+d x) \, dx}{a}+\frac{2 \int \text{csch}^2(c+d x) \, dx}{a}\\ &=\frac{i \tanh ^{-1}(\cosh (c+d x))}{a d}+\frac{\coth (c+d x)}{d (a+i a \sinh (c+d x))}-\frac{(2 i) \operatorname{Subst}(\int 1 \, dx,x,-i \coth (c+d x))}{a d}\\ &=\frac{i \tanh ^{-1}(\cosh (c+d x))}{a d}-\frac{2 \coth (c+d x)}{a d}+\frac{\coth (c+d x)}{d (a+i a \sinh (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.205343, size = 61, normalized size = 1.07 \[ -\frac{\text{sech}(c+d x) \left (2 \sinh (c+d x)+\text{csch}(c+d x)-i \sqrt{\cosh ^2(c+d x)} \tanh ^{-1}\left (\sqrt{\cosh ^2(c+d x)}\right )+i\right )}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.04, size = 79, normalized size = 1.4 \begin{align*} -{\frac{1}{2\,da}\tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{1}{2\,da} \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}-{\frac{i}{da}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) }-2\,{\frac{1}{da \left ( -i+\tanh \left ( 1/2\,dx+c/2 \right ) \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.07214, size = 149, normalized size = 2.61 \begin{align*} -\frac{4 \,{\left (e^{\left (-d x - c\right )} - i \, e^{\left (-2 \, d x - 2 \, c\right )} + 2 i\right )}}{{\left (2 \, a e^{\left (-d x - c\right )} - 2 i \, a e^{\left (-2 \, d x - 2 \, c\right )} - 2 \, a e^{\left (-3 \, d x - 3 \, c\right )} + 2 i \, a\right )} d} + \frac{i \, \log \left (e^{\left (-d x - c\right )} + 1\right )}{a d} - \frac{i \, \log \left (e^{\left (-d x - c\right )} - 1\right )}{a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.56622, size = 378, normalized size = 6.63 \begin{align*} \frac{{\left (i \, e^{\left (3 \, d x + 3 \, c\right )} + e^{\left (2 \, d x + 2 \, c\right )} - i \, e^{\left (d x + c\right )} - 1\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) +{\left (-i \, e^{\left (3 \, d x + 3 \, c\right )} - e^{\left (2 \, d x + 2 \, c\right )} + i \, e^{\left (d x + c\right )} + 1\right )} \log \left (e^{\left (d x + c\right )} - 1\right ) - 2 i \, e^{\left (2 \, d x + 2 \, c\right )} - 2 \, e^{\left (d x + c\right )} + 4 i}{a d e^{\left (3 \, d x + 3 \, c\right )} - i \, a d e^{\left (2 \, d x + 2 \, c\right )} - a d e^{\left (d x + c\right )} + i \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2282, size = 128, normalized size = 2.25 \begin{align*} \frac{i \, \log \left (e^{\left (d x + c\right )} + 1\right )}{a d} - \frac{i \, \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right )}{a d} + \frac{2 \,{\left (e^{\left (2 \, d x + 2 \, c\right )} - i \, e^{\left (d x + c\right )} - 2\right )}}{a d{\left (i \, e^{\left (3 \, d x + 3 \, c\right )} + e^{\left (2 \, d x + 2 \, c\right )} - i \, e^{\left (d x + c\right )} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]